import tkinter
# entry 输入文字的条子
window = tkinter.Tk()
window.title = ('窗口名字')
window.geometry("200x200")  # 设置窗口尺寸

l=tkinter.Label(window,text='empyt',bg='yellow',width=20)
l.pack()

def print_selection(v):
    l.config(text='you have selected '+v)

s = tkinter.Scale(window,label='名字',from_=5,to=11,orient=tkinter.HORIZONTAL,length=200,showvalue=1,
                  tickin=3,resolution=0.01,command=print_selection)    #orient方向横竖   resolution保留几位小数  tickin 隔几个数字显示一个数字
s.pack()                                                               #showvalue 是否在拉条上显示数  1/0
window.mainloop()




